package com.hzsoft.sys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hzsoft.sys.entity.SysRoleMenu;
import com.hzsoft.sys.mapper.SysRoleMenuMapper;
import com.hzsoft.sys.service.SysRoleMenuService;

@Service("sysRoleMenuService")
public class SysRoleMenuServiceImpl implements SysRoleMenuService {
	
	private SysRoleMenuMapper sysRoleMenuMapper;
	
	public SysRoleMenuMapper getSysRoleMenuMapper() {
		return sysRoleMenuMapper;
	}
	@Autowired
	public void setSysRoleMenuMapper(SysRoleMenuMapper sysRoleMenuMapper) {
		this.sysRoleMenuMapper = sysRoleMenuMapper;
	}

	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.deleteByPrimaryKey(id);
	}
	@Transactional
	public int insertSelective(SysRoleMenu record) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.insertSelective(record);
	}
	
	public SysRoleMenu selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.selectByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(SysRoleMenu record) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(SysRoleMenu record) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.updateByPrimaryKey(record);
	}
	public List<SysRoleMenu> selectByRoleId(String roleId) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.selectByRoleId(roleId);
	}
	@Transactional
	public int deleteByRoleId(String roleId) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.deleteByRoleId(roleId);
	}
	@Transactional
	public int insert(List<SysRoleMenu> roleMenuList) {
		// TODO Auto-generated method stub
		return sysRoleMenuMapper.insert(roleMenuList);
	}

	

}
